package ControlLayer;
import java.util.ArrayList;
import ModelLayer.*;

/**
 * Write a description of class LeaseCtrl here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class LeaseCtrl
{
    // instance variables - replace the example below with your own
    private static LeaseContainer leaseCont = new LeaseContainer();
    private static CustomerCtrl customerCtrl = new CustomerCtrl();
    private static ItemCtrl itemCtrl = new ItemCtrl();

    /**
     * Constructor for objects of class LeaseCtrl
     */
    public LeaseCtrl()
    {
        // initialise instance variables
    }

    /**
     * An example of a method - replace this comment with your own
     * 
     * @param  y   a sample parameter for a method
     * @return     the sum of x and y 
     */
    
    public Customer getCustomer(long _id)
    {
        return customerCtrl.getCustomer(_id);
    }
    
    public RentItem getRentItem(long _id)
    {
        return itemCtrl.getRentItem(_id);
    }
    
    public Lease getLease(long _id)
    {
        return leaseCont.getLease(_id);
    }
    
    public void createLease(Lease _lease)
    {
        leaseCont.createLease(_lease);
    }
    
    public void endLease(long _id, String _actReturnDate)
    {
        leaseCont.endLease(_id, _actReturnDate);
    }
    
    public ArrayList<Lease> listAllLeases()
    {
        return leaseCont.listAllLeases();
    }
    
    public ArrayList<Customer> listAllCustomers()
    {
        return customerCtrl.listAllCustomers();
    }
    
    public ArrayList<RentItem> listAllRentItems()
    {
        return itemCtrl.listAllRentItems();
    }
}
